<table class="table">
    <tr>
        <td>ID</td>
        <td>MATA PELAJARAN</td>
        <td>ACTION</td>
    </tr>
    <?php foreach ($mapel as $mhs) : ?>
        <tr>
            <td><?php echo $mhs['id']; ?></td>
            <td><?php echo $mhs['mapel'];?></td>
            <td><a href="<?php echo site_url() ?>/admin/ubah_mapel/<?php echo $mhs['id']; ?>">Ubah</a> || <a href="<?php echo site_url() ?>/admin/del_mapel/<?php echo $mhs['id']; ?>" onclick="return confirm('Apakah sudah benar benar yakin untuk menghapus data ?')">Hapus</a> </td>
        </tr>
    <?php endforeach; ?>
</table>